package com.huo.task.service;

import com.huo.filestransport.service.FtpService;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

@DisallowConcurrentExecution
public class SaveDefinitionFileInfo implements Job {

	private final Logger logger = LoggerFactory.getLogger(getClass());
	@Autowired
	private FtpService transportService;
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		logger.info("保存优先下载文件的JOB开始");
		transportService.saveDefinitionFileInfo(transportService.makeFtpPathByDifiniton());
		logger.info("保存优先下载文件的JOB结束");
	}

}
